<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ page import="com.google.appengine.api.users.*" %>
<%@ page import="java.security.Principal" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<%
	UserService userService = UserServiceFactory.getUserService();
	Principal principal = request.getUserPrincipal();
	String thisURL = request.getRequestURI();
%>
       <div class="header">
       		<div class="logo"><a href="/"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>            
        <div id="menu">
            <ul>                                                                       
            <li><a href="/"><bean:message key="menu.home"/></a></li>
            <li><a href="about.html"><bean:message key="menu.about"/></a></li>
            <li><a href="category.html"><bean:message key="menu.books"/></a></li>
            <li><a href="specials.html"><bean:message key="menu.hot"/></a></li>
<%if(principal != null){%>
            <li><a href="<%=userService.createLogoutURL(thisURL)%>"><%=principal.getName()%></a></li>
<%}else{%>
            <li><a href="<%=userService.createLoginURL(thisURL)%>">Login</a></li>
<%}%>
            </ul>
        </div>     
            
            
       </div> 